package com.cloudjan.springcloud.service;

import com.cloudjan.springcloud.entities.CommonResult;
import com.cloudjan.springcloud.entities.Payment;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * 定义feign调用服务接口
 */
@FeignClient(value = "CLOUD-PAYMENT-SERVICE")
@Component
public interface OrderFeignService {

    @GetMapping(value = "/payment/get/{id}")
    public CommonResult<Payment> get(@PathVariable("id") Long id);

    @GetMapping("/payment/feign/timeout")
    public String paymentFeignTimeout();

}
